London | 26-SDC-Mar | Khilola Rustamova| Sprint 1 | Individual shell tools#358
Open
HilolaRustam wants to merge 2 commits intoCodeYourFuture:mainfrom
Open
London | 26-SDC-Mar | Khilola Rustamova| Sprint 1 | Individual shell tools#358HilolaRustam wants to merge 2 commits intoCodeYourFuture:mainfrom
HilolaRustam wants to merge 2 commits intoCodeYourFuture:mainfrom
Conversation
SlideGauge
reviewed
Apr 5, 2026
| # NOTE: This is a stretch exercise - it is optional. | ||
|
|
||
| # TODO: Write a command to output just the names of each player along with the total of adding all of that player's scores. | ||
| awk '{sum=o; for(i=3; i<=NF; i++) sum+=$i; print $1, sum}' scores-table.txt |
There was a problem hiding this comment.
Could you have a look at how we initialise sum variable? Is it what we really want?
| set -euo pipefail | ||
|
|
||
| # TODO: Write a command to output the name of every `.txt` file in this directory which contains a line of dialogue said by the Doctor. | ||
| grep -l "^Doctor" *.txt |
There was a problem hiding this comment.
if our file contained a line like "Doctors:" what will happen? Should we make more precise mask?
| set -euo pipefail | ||
|
|
||
| # TODO: Write a command to output, for each `.txt` file in this directory, how many lines of dialogue the Doctor has. | ||
| grep -c "^Doctor" *.txt |
There was a problem hiding this comment.
Same here: if our file contained a line like "Doctors:" what will happen? Should we make more precise mask?
| set -euo pipefail | ||
|
|
||
| # TODO: Write a command to output the contents of the file `helper-3.txt` inside the helper-files directory to the terminal. | ||
| cat ../helper-files/helper-3.txt | nl |
There was a problem hiding this comment.
Can we use some cat command line parameters to get the same output?
| # NOTE: This is a stretch exercise - it is optional. | ||
|
|
||
| # TODO: Write a command to output the contents of all of the files in the helper-files directory to the terminal. | ||
| cat ../helper-files/* | nl |
There was a problem hiding this comment.
Can we use some cat command line parameters to get the same output?
| set -euo pipefail | ||
|
|
||
| # TODO: Write a command to output just the names of each player in London along with the score from their last attempt. | ||
| awk '$2 == "London" {print $1, $NF}' scores-table.txt |
|
Good job, I've got a couple of notes to address, fix them please and I'll complete the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Individual shell tools exercise is completed
Questions